//引入 Vue 核心库
import Vue from "vue";
//引入 Vuex
import Vuex from "vuex";
//应用 Vuex 插件
Vue.use(Vuex);

//引入子模块仓库
import home from "./home";
import search from "./search";
import detail from "./detail";
import shopCart from "./shopcart";

//需要暴露 VueX.Store 类的实例
export default new Vuex.Store({
    //模块化编程：把小仓库进行合并，变成大仓库
    modules: {
        home,
        search,
        detail,
        shopCart,
    }
})